<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script type="text/javascript" src="{{url_for('static',filename='js/jquery.min.js')}}"></script>
    <script src="{{url_for('static',filename='js/bootstrap.min.js')}}"></script>
    <link rel="stylesheet" href="{{url_for('static',filename='css/bootstrap.min.css')}}">
    <title>Title</title>
</head>
<body>
        <nav class="navbar navbar-default" role="navigation">
    <div class="container-fluid">
    <div class="navbar-header">
        <a class="navbar-brand" href="#">添之咨询后台管理系统</a>
    </div>
    <div>

        <ul class="nav navbar-nav navbar-right">
            <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                    管理员{{ session['admin'] if session['admin'] else "未登录" }}
                    <b class="caret"></b>
                </a>
                <ul class="dropdown-menu">
                    <li><a href="{{ url_for('login_out') }}">退出</a></li>
                </ul>
            </li>
        </ul>
    </div>
    </div>
</nav>
<div class="row">
    <div class="col-md-6 col-md-offset-3">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4>管理员登录</h4>
            <div>
            <div class="panel-body">
                <form action="#" class="form-horizontal" method="post">
                    <div class="col-md-10 col-md-offset-1">
                        {% with messages = get_flashed_messages() %}
                            {% if messages %}
                                {% for msg in messages %}
                                    <div class="alert alert-warning">
                                        <a href="#" class="close" data-dismiss="alert">&times;</a>
                                    {{ msg }}
                                    </div>
                                {% endfor %}
                            {% endif %}
                        {% endwith %}
                      <div class="form-group">
                          <label for="username" class="col-md-2">用户名</label>
                          <div class="col-md-10">
                            <input type="text" class="form-control" name="username" id="username">
                          </div>
                      </div>
                      <div class="form-group">
                          <label for="pwd" class="col-md-2">密码</label>
                          <div class="col-md-10">
                            <input type="password" class="form-control" name="pwd" id="pwd">
                          </div>
                      </div>
                    <div class="form-group">
                        <div class="col-md-10 col-md-offset-2">
                            <input class="btn btn-primary" type="submit" value="登录">
                        </div>
                    </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
</div>
</div>


</body>
</html>